/*********************************************************************
 * Class implementing a node of a binary tree by storing references
 * to an element, a parent node, and a left and right child.
 *
 * @author Duncan Buell, following GT chapter 7, page 288
**/
public interface IBTNode
{
/*********************************************************************
 * Accessors and mutators.
**/
/*********************************************************************
 * Method to return the height of a node
 * @return the height.
**/
  public int getHeight();

/*********************************************************************
 * Method to get the left child.
 * @return the left child.
**/
  public BTNode getLeft();

/*********************************************************************
 * Method to set the left.
 * @param v the left node.
**/
  public void setLeft(BTNode v);

/*********************************************************************
 * Method to get the parent.
 * @return the parent.
**/
  public BTNode getParent();

/*********************************************************************
 * Method to set the parent.
 * @param v the parent node.
**/
  public void setParent(BTNode v);

/*********************************************************************
 * Method to return the <code>Record</code> at this position.
 * @return the element.
**/
  public Record getElement();

/*********************************************************************
 * Method to set the <code>Record</code> at this position.
 * @param rec the <code>Record</code> to be set.
**/
  public void setElement(Record rec);

/*********************************************************************
 * Method to get the right child.
 * @return the right child.
**/
  public BTNode getRight();

/*********************************************************************
 * Method to set the right.
 * @param v the right node.
**/
  public void setRight(BTNode v);

/*********************************************************************
 * General methods.
**/
/*********************************************************************
 * Method to return a boolean as to whether a node has a left child.
 * @return the <code>boolean</code> answer to the
 *         <code>hasLeft</code> question. 
**/
  public boolean hasLeft();

/*********************************************************************
 * Method to return a boolean as to whether a node has a right child.
 * @return the <code>boolean</code> answer to the
 *         <code>hasRight</code> question. 
**/
  public boolean hasRight();

/*********************************************************************
 * Method to return a boolean as to whether a node is external.
 * @return the <code>boolean</code> answer to the
 *         <code>isExternal</code> question. 
**/
  public boolean isExternal();

/*********************************************************************
 * Method to return a boolean as to whether a node is internal.
 * @return the <code>boolean</code> answer to the
 *         <code>isInternal</code> question. 
**/
  public boolean isInternal();

/*********************************************************************
 * Method to convert to a <code>String</code>
 * @return the <code>toString</code> version of the node's record.
**/
  public String toString();

} // public interface IBTNode
